<template>
  <CustomNavbar />
  <XtxSwiper :swipperList="swipperList" />
  <CategoryPanel />
  <view>index</view>
</template>

<script setup>
import CustomNavbar from "./components/customNavbar.vue";
import CategoryPanel from "./components/categoryPanel.vue";
import { reqSwiper } from "@/api/swapper/getSwapper.ts";
import { onMounted, ref } from "vue";

const swipperList = ref([]);
const categoryId = ref(1);
onMounted(() => {
  getSwiper();
});
const getSwiper = async () => {
  const result = await reqSwiper(categoryId.value);

  swipperList.value = result.data;
};
</script>

<style lang="scss" scoped>
page {
  background-color: red;
}
</style>
